\hypertarget{aes_8c}{\section{E\+:/\+Other/\+Gitee/components-\/examples/\+A01-\/\+A\+E\+S/exam/aes/aes.c 文件参考}
\label{aes_8c}\index{E\+:/\+Other/\+Gitee/components-\/examples/\+A01-\/\+A\+E\+S/exam/aes/aes.\+c@{E\+:/\+Other/\+Gitee/components-\/examples/\+A01-\/\+A\+E\+S/exam/aes/aes.\+c}}
}
{\ttfamily \#include \char`\"{}aes.\+h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}gmult.\+h\char`\"{}}\\*
\subsection*{函数}
\begin{DoxyCompactItemize}
\item 
uint8\+\_\+t \hyperlink{aes_8c_a2a81402428c8f2be48e0cc40454164a0}{gadd} (uint8\+\_\+t a, uint8\+\_\+t b)
\begin{DoxyCompactList}\small\item\em Addition in G\+F(2$^\wedge$8) \end{DoxyCompactList}\item 
uint8\+\_\+t \hyperlink{aes_8c_a589f455f9e9215c4328dd53f755bc839}{gsub} (uint8\+\_\+t a, uint8\+\_\+t b)
\begin{DoxyCompactList}\small\item\em Subtraction in G\+F(2$^\wedge$8) \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a4fd78e9e70a8fa25ffe7ac89c18d31a3}{coef\+\_\+add} (uint8\+\_\+t a\mbox{[}$\,$\mbox{]}, uint8\+\_\+t b\mbox{[}$\,$\mbox{]}, uint8\+\_\+t d\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Addition of 4 byte words. \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a04aedb6d0c8e24c05e0f0ae089874229}{coef\+\_\+mult} (uint8\+\_\+t $\ast$a, uint8\+\_\+t $\ast$b, uint8\+\_\+t $\ast$d)
\item 
uint8\+\_\+t $\ast$ \hyperlink{aes_8c_a1ce5ff75f809a1788aa380e8a5c43bf2}{Rcon} (uint8\+\_\+t i)
\item 
void \hyperlink{aes_8c_a3647794630b190782fc19e3d9b2be035}{add\+\_\+round\+\_\+key} (uint8\+\_\+t $\ast$state, uint8\+\_\+t $\ast$w, uint8\+\_\+t r)
\item 
void \hyperlink{aes_8c_adb11e39050fc05e4546c825ca68d6eae}{mix\+\_\+columns} (uint8\+\_\+t $\ast$state)
\begin{DoxyCompactList}\small\item\em 列混合变换 \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a4f1588573568532d6eee4ab5bab3da05}{inv\+\_\+mix\+\_\+columns} (uint8\+\_\+t $\ast$state)
\begin{DoxyCompactList}\small\item\em 逆列混合变换 \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a8887303a86f47615327ccb6ec6832bad}{shift\+\_\+rows} (uint8\+\_\+t $\ast$state)
\begin{DoxyCompactList}\small\item\em 行移位变换 \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a600ebfd9163919a2224440fc627bc659}{inv\+\_\+shift\+\_\+rows} (uint8\+\_\+t $\ast$state)
\begin{DoxyCompactList}\small\item\em 逆行移位变换 \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a26eb58cd12585e4469b85fe2c07d7e43}{sub\+\_\+bytes} (uint8\+\_\+t $\ast$state)
\begin{DoxyCompactList}\small\item\em 字节替换 \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a159a659a54feeb3f10ea6b9b458da4a3}{inv\+\_\+sub\+\_\+bytes} (uint8\+\_\+t $\ast$state)
\begin{DoxyCompactList}\small\item\em 逆字节替代变换 \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a95c2f223af5c7bc9e20b501fa4c026e3}{sub\+\_\+word} (uint8\+\_\+t $\ast$w)
\begin{DoxyCompactList}\small\item\em 对于 4 字节中的每一字节分别应用 S 盒 \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a65c0ad6a1eef16ffa1c54cb0cb03f9b0}{rot\+\_\+word} (uint8\+\_\+t $\ast$w)
\begin{DoxyCompactList}\small\item\em 对 4-\/byte 字进行循环移位 \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a461739b060263bfe2888f4a47d8f5186}{aes\+\_\+key\+\_\+expansion} (uint8\+\_\+t $\ast$key, uint8\+\_\+t $\ast$w)
\begin{DoxyCompactList}\small\item\em Key Expansion. \end{DoxyCompactList}\item 
uint8\+\_\+t $\ast$ \hyperlink{aes_8c_a5682ceb1811499fe30fbe705877ff32c}{aes\+\_\+init} (size\+\_\+t key\+\_\+size)
\begin{DoxyCompactList}\small\item\em Initialize A\+E\+S variables and allocate memory for expanded key. \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a5d8ac3ac83810baa35fa15c5e4b25303}{aes\+\_\+cipher} (uint8\+\_\+t $\ast$in, uint8\+\_\+t $\ast$out, uint8\+\_\+t $\ast$w)
\begin{DoxyCompactList}\small\item\em Performs the A\+E\+S cipher operation. \end{DoxyCompactList}\item 
void \hyperlink{aes_8c_a73d0f24db5e8c95eaf2b6c1979188b50}{aes\+\_\+inv\+\_\+cipher} (uint8\+\_\+t $\ast$in, uint8\+\_\+t $\ast$out, uint8\+\_\+t $\ast$w)
\begin{DoxyCompactList}\small\item\em Performs the A\+E\+S inverse cipher operation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{变量}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{aes_8c_a2689c4b3931025b79053532a5f1b0a85}{K}
\begin{DoxyCompactList}\small\item\em 密码所使用的秘密密钥. \end{DoxyCompactList}\item 
int \hyperlink{aes_8c_afcfa24a6132fa0fcf654b9571c2459b6}{Nb} = 4
\begin{DoxyCompactList}\small\item\em 状态包含的列(32-\/bit字)的个数。对于\+A\+E\+S， Nb＝4 . \end{DoxyCompactList}\item 
int \hyperlink{aes_8c_a44909051db62133600cb826ba68fccca}{Nk}
\begin{DoxyCompactList}\small\item\em 密钥包含的 32-\/bit 字的个数。 对于该标准， Nk＝4,6 或 8. \end{DoxyCompactList}\item 
int \hyperlink{aes_8c_a7a14aa552991b97c25b8d9ff3c7d66e0}{Nr}
\begin{DoxyCompactList}\small\item\em 轮数，是 Nk 和 Nb(固定的)的函数。对于该标准， Nr＝10,12 或 14. \end{DoxyCompactList}\item 
uint8\+\_\+t \hyperlink{aes_8c_a9f780d9aad33a38c6753b23246ba762d}{R} \mbox{[}$\,$\mbox{]} = \{0x02, 0x00, 0x00, 0x00\}
\begin{DoxyCompactList}\small\item\em Generates the round constant Rcon\mbox{[}i\mbox{]}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{函数说明}
\hypertarget{aes_8c_a3647794630b190782fc19e3d9b2be035}{\index{aes.\+c@{aes.\+c}!add\+\_\+round\+\_\+key@{add\+\_\+round\+\_\+key}}
\index{add\+\_\+round\+\_\+key@{add\+\_\+round\+\_\+key}!aes.\+c@{aes.\+c}}
\subsubsection[{add\+\_\+round\+\_\+key}]{\setlength{\rightskip}{0pt plus 5cm}void add\+\_\+round\+\_\+key (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{state, }
\item[{uint8\+\_\+t $\ast$}]{w, }
\item[{uint8\+\_\+t}]{r}
\end{DoxyParamCaption}
)}}\label{aes_8c_a3647794630b190782fc19e3d9b2be035}
\hypertarget{aes_8c_a5d8ac3ac83810baa35fa15c5e4b25303}{\index{aes.\+c@{aes.\+c}!aes\+\_\+cipher@{aes\+\_\+cipher}}
\index{aes\+\_\+cipher@{aes\+\_\+cipher}!aes.\+c@{aes.\+c}}
\subsubsection[{aes\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}void aes\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{in, }
\item[{uint8\+\_\+t $\ast$}]{out, }
\item[{uint8\+\_\+t $\ast$}]{w}
\end{DoxyParamCaption}
)}}\label{aes_8c_a5d8ac3ac83810baa35fa15c5e4b25303}


Performs the A\+E\+S cipher operation. 


\begin{DoxyParams}{参数}
{\em $\ast$in} & 明文 \\
\hline
{\em $\ast$out} & 加密后的密文 \\
\hline
{\em $\ast$w} & 扩展后的密钥 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em } & \\
\hline
\end{DoxyRetVals}
\hypertarget{aes_8c_a5682ceb1811499fe30fbe705877ff32c}{\index{aes.\+c@{aes.\+c}!aes\+\_\+init@{aes\+\_\+init}}
\index{aes\+\_\+init@{aes\+\_\+init}!aes.\+c@{aes.\+c}}
\subsubsection[{aes\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t$\ast$ aes\+\_\+init (
\begin{DoxyParamCaption}
\item[{size\+\_\+t}]{key\+\_\+size}
\end{DoxyParamCaption}
)}}\label{aes_8c_a5682ceb1811499fe30fbe705877ff32c}


Initialize A\+E\+S variables and allocate memory for expanded key. 


\begin{DoxyParams}{参数}
{\em key\+\_\+size} & 密钥的字节数 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em } & \\
\hline
\end{DoxyRetVals}
\hypertarget{aes_8c_a73d0f24db5e8c95eaf2b6c1979188b50}{\index{aes.\+c@{aes.\+c}!aes\+\_\+inv\+\_\+cipher@{aes\+\_\+inv\+\_\+cipher}}
\index{aes\+\_\+inv\+\_\+cipher@{aes\+\_\+inv\+\_\+cipher}!aes.\+c@{aes.\+c}}
\subsubsection[{aes\+\_\+inv\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}void aes\+\_\+inv\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{in, }
\item[{uint8\+\_\+t $\ast$}]{out, }
\item[{uint8\+\_\+t $\ast$}]{w}
\end{DoxyParamCaption}
)}}\label{aes_8c_a73d0f24db5e8c95eaf2b6c1979188b50}


Performs the A\+E\+S inverse cipher operation. 


\begin{DoxyParams}{参数}
{\em $\ast$in} & 密文 \\
\hline
{\em $\ast$out} & 密文的逆 \\
\hline
{\em $\ast$w} & 扩展后的密钥 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em } & \\
\hline
\end{DoxyRetVals}
\hypertarget{aes_8c_a461739b060263bfe2888f4a47d8f5186}{\index{aes.\+c@{aes.\+c}!aes\+\_\+key\+\_\+expansion@{aes\+\_\+key\+\_\+expansion}}
\index{aes\+\_\+key\+\_\+expansion@{aes\+\_\+key\+\_\+expansion}!aes.\+c@{aes.\+c}}
\subsubsection[{aes\+\_\+key\+\_\+expansion}]{\setlength{\rightskip}{0pt plus 5cm}void aes\+\_\+key\+\_\+expansion (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{key, }
\item[{uint8\+\_\+t $\ast$}]{w}
\end{DoxyParamCaption}
)}}\label{aes_8c_a461739b060263bfe2888f4a47d8f5186}


Key Expansion. 


\begin{DoxyParams}{参数}
{\em $\ast$key} & 密钥 \\
\hline
{\em $\ast$w} & 密钥编排结果 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em } & \\
\hline
\end{DoxyRetVals}
\hypertarget{aes_8c_a4fd78e9e70a8fa25ffe7ac89c18d31a3}{\index{aes.\+c@{aes.\+c}!coef\+\_\+add@{coef\+\_\+add}}
\index{coef\+\_\+add@{coef\+\_\+add}!aes.\+c@{aes.\+c}}
\subsubsection[{coef\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}void coef\+\_\+add (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t}]{a\mbox{[}$\,$\mbox{]}, }
\item[{uint8\+\_\+t}]{b\mbox{[}$\,$\mbox{]}, }
\item[{uint8\+\_\+t}]{d\mbox{[}$\,$\mbox{]}}
\end{DoxyParamCaption}
)}}\label{aes_8c_a4fd78e9e70a8fa25ffe7ac89c18d31a3}


Addition of 4 byte words. 

m(x) = x4+1 
\begin{DoxyParams}{参数}
{\em } & retval \\
\hline
\end{DoxyParams}
\hypertarget{aes_8c_a04aedb6d0c8e24c05e0f0ae089874229}{\index{aes.\+c@{aes.\+c}!coef\+\_\+mult@{coef\+\_\+mult}}
\index{coef\+\_\+mult@{coef\+\_\+mult}!aes.\+c@{aes.\+c}}
\subsubsection[{coef\+\_\+mult}]{\setlength{\rightskip}{0pt plus 5cm}void coef\+\_\+mult (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{a, }
\item[{uint8\+\_\+t $\ast$}]{b, }
\item[{uint8\+\_\+t $\ast$}]{d}
\end{DoxyParamCaption}
)}}\label{aes_8c_a04aedb6d0c8e24c05e0f0ae089874229}
\hypertarget{aes_8c_a2a81402428c8f2be48e0cc40454164a0}{\index{aes.\+c@{aes.\+c}!gadd@{gadd}}
\index{gadd@{gadd}!aes.\+c@{aes.\+c}}
\subsubsection[{gadd}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t gadd (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t}]{a, }
\item[{uint8\+\_\+t}]{b}
\end{DoxyParamCaption}
)}}\label{aes_8c_a2a81402428c8f2be48e0cc40454164a0}


Addition in G\+F(2$^\wedge$8) 

\hypertarget{aes_8c_a589f455f9e9215c4328dd53f755bc839}{\index{aes.\+c@{aes.\+c}!gsub@{gsub}}
\index{gsub@{gsub}!aes.\+c@{aes.\+c}}
\subsubsection[{gsub}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t gsub (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t}]{a, }
\item[{uint8\+\_\+t}]{b}
\end{DoxyParamCaption}
)}}\label{aes_8c_a589f455f9e9215c4328dd53f755bc839}


Subtraction in G\+F(2$^\wedge$8) 

\hypertarget{aes_8c_a4f1588573568532d6eee4ab5bab3da05}{\index{aes.\+c@{aes.\+c}!inv\+\_\+mix\+\_\+columns@{inv\+\_\+mix\+\_\+columns}}
\index{inv\+\_\+mix\+\_\+columns@{inv\+\_\+mix\+\_\+columns}!aes.\+c@{aes.\+c}}
\subsubsection[{inv\+\_\+mix\+\_\+columns}]{\setlength{\rightskip}{0pt plus 5cm}void inv\+\_\+mix\+\_\+columns (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{state}
\end{DoxyParamCaption}
)}}\label{aes_8c_a4f1588573568532d6eee4ab5bab3da05}


逆列混合变换 

Transformation in the Inverse Cipher that is the inverse of Mix\+Columns(). 
\begin{DoxyParams}{参数}
{\em } & retval \\
\hline
\end{DoxyParams}
\hypertarget{aes_8c_a600ebfd9163919a2224440fc627bc659}{\index{aes.\+c@{aes.\+c}!inv\+\_\+shift\+\_\+rows@{inv\+\_\+shift\+\_\+rows}}
\index{inv\+\_\+shift\+\_\+rows@{inv\+\_\+shift\+\_\+rows}!aes.\+c@{aes.\+c}}
\subsubsection[{inv\+\_\+shift\+\_\+rows}]{\setlength{\rightskip}{0pt plus 5cm}void inv\+\_\+shift\+\_\+rows (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{state}
\end{DoxyParamCaption}
)}}\label{aes_8c_a600ebfd9163919a2224440fc627bc659}


逆行移位变换 

Transformation in the Inverse Cipher that is the inverse of Shift\+Rows(). 
\begin{DoxyParams}{参数}
{\em } & retval \\
\hline
\end{DoxyParams}
\hypertarget{aes_8c_a159a659a54feeb3f10ea6b9b458da4a3}{\index{aes.\+c@{aes.\+c}!inv\+\_\+sub\+\_\+bytes@{inv\+\_\+sub\+\_\+bytes}}
\index{inv\+\_\+sub\+\_\+bytes@{inv\+\_\+sub\+\_\+bytes}!aes.\+c@{aes.\+c}}
\subsubsection[{inv\+\_\+sub\+\_\+bytes}]{\setlength{\rightskip}{0pt plus 5cm}void inv\+\_\+sub\+\_\+bytes (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{state}
\end{DoxyParamCaption}
)}}\label{aes_8c_a159a659a54feeb3f10ea6b9b458da4a3}


逆字节替代变换 

Transformation in the Inverse Cipher that is the inverse of Sub\+Bytes(). 
\begin{DoxyParams}{参数}
{\em } & retval \\
\hline
\end{DoxyParams}
\hypertarget{aes_8c_adb11e39050fc05e4546c825ca68d6eae}{\index{aes.\+c@{aes.\+c}!mix\+\_\+columns@{mix\+\_\+columns}}
\index{mix\+\_\+columns@{mix\+\_\+columns}!aes.\+c@{aes.\+c}}
\subsubsection[{mix\+\_\+columns}]{\setlength{\rightskip}{0pt plus 5cm}void mix\+\_\+columns (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{state}
\end{DoxyParamCaption}
)}}\label{aes_8c_adb11e39050fc05e4546c825ca68d6eae}


列混合变换 

Transformation in the Cipher that takes all of the columns of the State and mixes their data (independently of one another) to produce new columns. 
\begin{DoxyParams}{参数}
{\em } & retval \\
\hline
\end{DoxyParams}
\hypertarget{aes_8c_a1ce5ff75f809a1788aa380e8a5c43bf2}{\index{aes.\+c@{aes.\+c}!Rcon@{Rcon}}
\index{Rcon@{Rcon}!aes.\+c@{aes.\+c}}
\subsubsection[{Rcon}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t$\ast$ Rcon (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t}]{i}
\end{DoxyParamCaption}
)}}\label{aes_8c_a1ce5ff75f809a1788aa380e8a5c43bf2}
\hypertarget{aes_8c_a65c0ad6a1eef16ffa1c54cb0cb03f9b0}{\index{aes.\+c@{aes.\+c}!rot\+\_\+word@{rot\+\_\+word}}
\index{rot\+\_\+word@{rot\+\_\+word}!aes.\+c@{aes.\+c}}
\subsubsection[{rot\+\_\+word}]{\setlength{\rightskip}{0pt plus 5cm}void rot\+\_\+word (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{w}
\end{DoxyParamCaption}
)}}\label{aes_8c_a65c0ad6a1eef16ffa1c54cb0cb03f9b0}


对 4-\/byte 字进行循环移位 

Function used in the Key Expansion routine that takes a four-\/byte word and performs a cyclic permutation. 
\begin{DoxyParams}{参数}
{\em $\ast$w} & \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em } & \\
\hline
\end{DoxyRetVals}
\hypertarget{aes_8c_a8887303a86f47615327ccb6ec6832bad}{\index{aes.\+c@{aes.\+c}!shift\+\_\+rows@{shift\+\_\+rows}}
\index{shift\+\_\+rows@{shift\+\_\+rows}!aes.\+c@{aes.\+c}}
\subsubsection[{shift\+\_\+rows}]{\setlength{\rightskip}{0pt plus 5cm}void shift\+\_\+rows (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{state}
\end{DoxyParamCaption}
)}}\label{aes_8c_a8887303a86f47615327ccb6ec6832bad}


行移位变换 

Transformation in the Cipher that processes the State by cyclically shifting the last three rows of the State by different offsets. 
\begin{DoxyParams}[1]{参数}
\mbox{\tt out}  & {\em $\ast$state} & \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em } & \\
\hline
\end{DoxyRetVals}
\hypertarget{aes_8c_a26eb58cd12585e4469b85fe2c07d7e43}{\index{aes.\+c@{aes.\+c}!sub\+\_\+bytes@{sub\+\_\+bytes}}
\index{sub\+\_\+bytes@{sub\+\_\+bytes}!aes.\+c@{aes.\+c}}
\subsubsection[{sub\+\_\+bytes}]{\setlength{\rightskip}{0pt plus 5cm}void sub\+\_\+bytes (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{state}
\end{DoxyParamCaption}
)}}\label{aes_8c_a26eb58cd12585e4469b85fe2c07d7e43}


字节替换 

Transformation in the Cipher that processes the State using a non­ linear byte substitution table (S-\/box) that operates on each of the State bytes independently. 
\begin{DoxyParams}{参数}
{\em } & retval \\
\hline
\end{DoxyParams}
\hypertarget{aes_8c_a95c2f223af5c7bc9e20b501fa4c026e3}{\index{aes.\+c@{aes.\+c}!sub\+\_\+word@{sub\+\_\+word}}
\index{sub\+\_\+word@{sub\+\_\+word}!aes.\+c@{aes.\+c}}
\subsubsection[{sub\+\_\+word}]{\setlength{\rightskip}{0pt plus 5cm}void sub\+\_\+word (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{w}
\end{DoxyParamCaption}
)}}\label{aes_8c_a95c2f223af5c7bc9e20b501fa4c026e3}


对于 4 字节中的每一字节分别应用 S 盒 

Function used in the Key Expansion routine that takes a four-\/byte input word and applies an S-\/box to each of the four bytes to produce an output word. 
\begin{DoxyParams}{参数}
{\em $\ast$w} & \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em } & \\
\hline
\end{DoxyRetVals}


\subsection{变量说明}
\hypertarget{aes_8c_a2689c4b3931025b79053532a5f1b0a85}{\index{aes.\+c@{aes.\+c}!K@{K}}
\index{K@{K}!aes.\+c@{aes.\+c}}
\subsubsection[{K}]{\setlength{\rightskip}{0pt plus 5cm}int K}}\label{aes_8c_a2689c4b3931025b79053532a5f1b0a85}


密码所使用的秘密密钥. 

\hypertarget{aes_8c_afcfa24a6132fa0fcf654b9571c2459b6}{\index{aes.\+c@{aes.\+c}!Nb@{Nb}}
\index{Nb@{Nb}!aes.\+c@{aes.\+c}}
\subsubsection[{Nb}]{\setlength{\rightskip}{0pt plus 5cm}int Nb = 4}}\label{aes_8c_afcfa24a6132fa0fcf654b9571c2459b6}


状态包含的列(32-\/bit字)的个数。对于\+A\+E\+S， Nb＝4 . 

\hypertarget{aes_8c_a44909051db62133600cb826ba68fccca}{\index{aes.\+c@{aes.\+c}!Nk@{Nk}}
\index{Nk@{Nk}!aes.\+c@{aes.\+c}}
\subsubsection[{Nk}]{\setlength{\rightskip}{0pt plus 5cm}int Nk}}\label{aes_8c_a44909051db62133600cb826ba68fccca}


密钥包含的 32-\/bit 字的个数。 对于该标准， Nk＝4,6 或 8. 

\hypertarget{aes_8c_a7a14aa552991b97c25b8d9ff3c7d66e0}{\index{aes.\+c@{aes.\+c}!Nr@{Nr}}
\index{Nr@{Nr}!aes.\+c@{aes.\+c}}
\subsubsection[{Nr}]{\setlength{\rightskip}{0pt plus 5cm}int Nr}}\label{aes_8c_a7a14aa552991b97c25b8d9ff3c7d66e0}


轮数，是 Nk 和 Nb(固定的)的函数。对于该标准， Nr＝10,12 或 14. 

\hypertarget{aes_8c_a9f780d9aad33a38c6753b23246ba762d}{\index{aes.\+c@{aes.\+c}!R@{R}}
\index{R@{R}!aes.\+c@{aes.\+c}}
\subsubsection[{R}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t R\mbox{[}$\,$\mbox{]} = \{0x02, 0x00, 0x00, 0x00\}}}\label{aes_8c_a9f780d9aad33a38c6753b23246ba762d}


Generates the round constant Rcon\mbox{[}i\mbox{]}. 

